"""
author: Mr_52Hz
date: 2019-10-21
类的属性访问：会首先访问实例属性，在遍历类属性
类的属性创建：只能动态创建实例属性
"""


class MyClass(object):

    name = 'default'
    type_ = 'my class'

    def __init__(self):
        self.age = 19

    @classmethod
    def type(cls):
        return cls.type_


if __name__ == '__main__':
    c = MyClass()
    print(c.name)
    print(c.age)
    c.name = 'w'
    print(c.name)
    print(c.__class__.name)
    print(c.type())



